package rmhc.gui  
{
	import flash.geom.Point;
	/**
	 * ...
	 * @author mick
	 */
	public class ScaleRectangle 
	{
		private var _TL:Point = new Point(0,0);
		private var _TR:Point = new Point(0,0);
		private var _BL:Point = new Point(0,0);
		private var _BR:Point = new Point(0,0);
		public function ScaleRectangle() 
		{
			
		}
		
		public function set TL(value:Point):void 
		{
			_TL = value;
			_TR.y = _TL.y;
			_BL.x = _TL.x;
		}
		
		public function set TR(value:Point):void 
		{
			_TR = value;
			_TL.y = _TR.y;
			_BR.x = _TR.x;
		}
		
		public function set BL(value:Point):void 
		{
			_BL = value;
			_BR.y = _BL.y;
			_TL.x = _BL.x
		}
		
		public function set BR(value:Point):void 
		{
			_BR = value;
			_BL.y = _BR.y;
			_TR.x = _BR.x;
		}
		public function get width():Number {
			return(Math.abs(_BL.x - _BR.x));
		}
		public function get height():Number {
			return(Math.abs(_BL.y - _TL.y));
		}
		public function get x():Number {
			return Math.min(_BL.x, _BR.x);
		}
		public function get y():Number {
			return Math.min(_BL.y, _TL.y);
		}
		
	}

}